import { http } from "@/utils/http";

type Result = {
  success: boolean;
  data?: Array<any>;
};

type ResultTable = {
  success: boolean;
  data?: {
    /** 列表数据 */
    list: Array<any>;
    /** 总条目数 */
    total?: number;
    /** 每页显示条目个数 */
    pageSize?: number;
    /** 当前页数 */
    currentPage?: number;
  };
};
/** 人员列表查询 */
export const getUserInfoList = (data?: object) => {
  return http.request<Result>("post", "/user/getUserInfoList", data);
};
/** 人员修改保存 */
export const saveOrEditUserInfo = (data?: object) => {
  return http.request<Result>("post", "/user/saveOrEditUserInfo", data);
};
/** 功能权限列表查询 */
export const getPermissionsList = (data?: object) => {
  return http.request<Result>("post", "/permissions/getPermissionsList", data);
};
/** 应用基础数据 */
export const getApplicationNameList = (data?: object) => {
  return http.request<Result>("post", "/applicationinfo/getApplicationNameList", data);
};
/** 根据应用获取权限名称基础数据 */
export const getAllSaaTask = (data?: object) => {
  return http.request<Result>("post", "/permissions/getAllSaaTask", data);
};
/** 机构基础数据 */
export const getAllcompany = (data?: object) => {
  return http.request<Result>("post", "/commonData/getAllcompany", data);
};
/** 父级权限初始化 */
export const getPermissionsById = (data?: object) => {
  return http.request<Result>("post", "/permissions/getPermissionsById", data);
};
/** 父级权限保存 */
export const savePermissions = (data?: object) => {
  return http.request<Result>("post", "/permissions/savePermissions", data);
};
/** 删除权限 */
export const deletePermissions = (data?: object) => {
  return http.request<Result>("post", "/permissions/deletePermissions", data);
};
/** 机构树形数据 */
export const getComanyTreeInfo = (data?: object) => {
  return http.request<Result>("post", "/commonData/getComanyTreeInfo", data);
};
/** 角色基础数据 */
export const getExecptRoleInfo = (data?: object) => {
  return http.request<Result>("post", "/user/getExecptRoleInfo", data);
};


